import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'landing-page',
      component: require('@/components/login').default,
      meta: {headBg:'transparent'}
    },
    {
      path: '/login',
      name: 'login',
      component: require('@/components/login').default,
      meta: {headBg:'transparent'}
    },
    {
      path: '/selectSubject',
      name: 'select-subject',
      component: require('@/components/selectSubject').default,
      meta: {headBg:'rgba(12, 198, 137, 1)'}
    },
    {
      path: '/selectSection',
      name: 'select-section',
      component: require('@/components/selectSection').default,
      meta: {headBg:'transparent',back:'select-subject'}
    }
  ],
  beforeEach: (to, from, next) => {
    // console.log(from, to)
    next()
  }
})
